import service from './axios'
import type { ApiResponse } from './axios'

function get<T = any>(url: string, params?: Record<string, any>): Promise<ApiResponse<T>> {
    return service.get(url, { params })
}

function post<T = any>(url: string, data?: Record<string, any>): Promise<ApiResponse<T>> {
    return service.post(url, data)
}

export { get, post }